﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Order.Common
{
    /// <summary>
    /// 执行方法Result
    /// </summary>
    public class ExecuteMethodResult
    {
        public ExecuteMethodResult(bool isSucceed, object message)
        {
            IsSucceed = isSucceed;
            Message = message;
        }

        /// <summary>
        /// 失败
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public static ExecuteMethodResult Failed(object message)
        {
            return new ExecuteMethodResult(false, message);
        }

        /// <summary>
        /// 成功
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public static ExecuteMethodResult Success()
        {
            return new ExecuteMethodResult(true, null);
        }
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool IsSucceed { get; set; }

        /// <summary>
        /// 信息通知
        /// </summary>
        public object Message { get; set; }

    }
}
